-------------------------------------------------------------------------------
       log:  c:\growth\isqfinal\ot_tbl3.log
  log type:  text
 opened on:   7 Apr 2006, 16:45:38
Analysis do-file c:\growth\isqfinal\ot_tbl3 run on  7 Apr 2006 at 16:45:38

. /*analyses for Oneal and Tir's "Does the Diversionary Use of Force Threaten t
> he
> Democratic Peace," International Studies Quarterly, regarding major democraci
> es:
> 4-7-2006*/
. 
. set mem 200m
(204800k)

. 
. use c:\growth\isqfinal\otnondir
(Oneal&Tir ISQ re diversionary theory, directed dyads, w/ Chiozza&Goemans ldr d
> at)

. 
. desc

Contains data from c:\growth\isqfinal\otnondir.dta
  obs:       465,443                          Oneal&Tir ISQ re diversionary
                                                theory, directed dyads, w/
                                                Chiozza&Goemans ldr dat
 vars:            26                          7 Apr 2006 16:45
 size:    27,461,137 (86.9% of memory free)   (_dta has notes)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
year            int    %8.0g                  
statea          int    %8.0g                  cow code for state a
stateb          int    %8.0g                  cow code for state b
lncaprat        float  %9.0g                  ln large/small capability ratio
allies          byte   %8.0g                  = 1 if dyad has at least 1
                                                alliance
polity_a        byte   %8.0g                  polity2 score, state a
polity_b        byte   %8.0g                  polity2 score, state b
majpow_a        byte   %8.0g                  = 1 if state a is a major power
majpow_b        byte   %8.0g                  = 1 if state b is a major power
trade           float  %9.0g                  =(tradeab+tradeba)/2
contig          byte   %8.0g                  direct state-to-state contig
distance        int    %9.0g                  capital to capital
numstate        int    %8.0g                  number of states in system
cgdpa           float  %9.0g                  gdp in millions current $
cgdpb           float  %9.0g                  gdp in millions current $
mzfatald1       byte   %8.0g                  fatality level of Maoz MID year
                                                t+1
leadid_a        float  %9.0g                * leader identification number
autoc_a_cg      byte   %9.0g                * Autocracy. See Jaggers and Gurr
                                                1995
mixed_a_cg      byte   %9.0g                * Mixed Regime. See Jaggers and
                                                Gurr 1995
democ_a_cg      byte   %9.0g                * Democracy. See Jaggers and Gurr
                                                1995
leadid_b        float  %9.0g                * leader identification number
autoc_b_cg      byte   %9.0g                * Autocracy. See Jaggers and Gurr
                                                1995
mixed_b_cg      byte   %9.0g                * Mixed Regime. See Jaggers and
                                                Gurr 1995
democ_b_cg      byte   %9.0g                * Democracy. See Jaggers and Gurr
                                                1995
growth2a        float  %9.0g                  =((rgdp96pc/rgdp96pc[_n-2])^.5)
                                                -1
growth2b        float  %9.0g                  =((rgdp96pc/rgdp96pc[_n-2])^.5)
                                                -1
                                            * indicated variables have notes
-------------------------------------------------------------------------------
Sorted by:  statea  stateb  year  

. summ

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
        year |    465443    1973.342    19.19863       1918       1998
      statea |    465443    301.2019    201.5786          2        920
      stateb |    465443    580.4549    204.5642         20        950
    lncaprat |    465443    2.037105    1.533674          0   10.21899
      allies |    465443    .0705607    .2560899          0          1
-------------+--------------------------------------------------------
    polity_a |    464697    .7444098    7.591295        -10         10
    polity_b |    464096   -1.368734    7.325237        -10         10
    majpow_a |    465443    .0589696    .2355681          0          1
    majpow_b |    465443    .0345026    .1825165          0          1
       trade |    438117    159.1332    2258.077          0   325252.5
-------------+--------------------------------------------------------
      contig |    465443    5.835802    .8460531          1          6
    distance |    465443    4673.309    2712.874          5      12347
    numstate |    465443    139.5432    39.44877         49        187
       cgdpa |    432956    125363.1    524379.2   16.48207    8720200
       cgdpb |    432886    82022.45    293202.8   16.48207    4109413
-------------+--------------------------------------------------------
   mzfatald1 |    464214    .0037978    .1341197          0          6
    leadid_a |    465443    1442.064    880.1534         25       3032
  autoc_a_cg |    465443    .3273849    .4692595          0          1
  mixed_a_cg |    465443    .2991967    .4579066          0          1
  democ_a_cg |    465443    .3734184    .4837123          0          1
-------------+--------------------------------------------------------
    leadid_b |    465443    2386.706    567.6363         42       3041
  autoc_b_cg |    465443    .4345774    .4957019          0          1
  mixed_b_cg |    465443    .3088928    .4620373          0          1
  democ_b_cg |    465443    .2565298    .4367181          0          1
    growth2a |    422127    .0156639    .0475126  -.4119384   .5209076
-------------+--------------------------------------------------------
    growth2b |    416798    .0164874    .0491842  -.4119384   .5209076

. 
. /*drop exactly zero growth for democs b/c result of interpol of rgdppc*/
. replace growth2a=. if growth2a==0 & democ_a_cg==1
(1033 real changes made, 1033 to missing)

. replace growth2b=. if growth2b==0 & democ_b_cg==1
(1678 real changes made, 1678 to missing)

. 
. gen jntdem=1 if democ_a_cg==1 & democ_b_cg==1
(418665 missing values generated)

. replace jntdem=0 if jntdem==. & democ_a_cg~=. & democ_b_cg~=.
(418665 real changes made)

. 
. gen dem_aut=1 if autoc_a_cg==1 & democ_b_cg==1
(431008 missing values generated)

. replace dem_aut=1 if autoc_b_cg==1 & democ_a_cg==1
(71649 real changes made)

. replace dem_aut=0 if dem_aut==. & autoc_a_cg~=.  /*autoc, democ, mixed always
>  coded
>                                                       if one known*/
(359359 real changes made)

. gen dem_incoh=1 if democ_a_cg==1 & mixed_b_cg==1 
(410065 missing values generated)

. replace dem_incoh=1 if democ_b_cg==1 & mixed_a_cg==1 
(38187 real changes made)

. replace dem_incoh=0 if dem_incoh==. & democ_a_cg~=.
(371878 real changes made)

. 
. gen aut_aut=1 if autoc_a_cg==1 & autoc_b_cg==1
(388304 missing values generated)

. replace aut_aut=1 if autoc_b_cg==1 & autoc_a_cg==1
(0 real changes made)

. replace aut_aut=0 if aut_aut==. & autoc_a_cg~=.  /*autoc, democ, mixed always
>  coded
>                                                       if one known*/
(388304 real changes made)

. gen incoh_incoh=1 if mixed_a_cg==1 & mixed_b_cg==1 
(417854 missing values generated)

. replace incoh_incoh=1 if mixed_b_cg==1 & mixed_a_cg==1 
(0 real changes made)

. replace incoh_incoh=0 if incoh_incoh==. & mixed_a_cg~=.
(417854 real changes made)

. 
. /*test for growth effect in joint democratic dyads*/
. #del ;
delimiter now ;
. gen smlgrow=growth2a if growth2a<growth2b & growth2b~=.;
(263845 missing values generated)

. quietly by statea stateb: replace smlgrow=. if ~((leadid_a==leadid_a[_n-1] &
>       leadid_a==leadid_a[_n-2])) & smlgrow==growth2a;

. replace smlgrow=growth2b if growth2b<growth2a & growth2a~=.;
(195810 real changes made)

. quietly by statea stateb: replace smlgrow=. if ~((leadid_b==leadid_b[_n-1] &
>       leadid_b==leadid_b[_n-2])) & smlgrow==growth2b;

. gen jntdXgr=jntdem*smlgrow;
(184528 missing values generated)

. replace jntdXgr=0 if jntdem==0;
(160138 real changes made)

. /*test for growth effect on democs in mixed dyads*/
> gen mixXgr=growth2a if dem_aut==1 & democ_a_cg==1 ;
(397413 missing values generated)

. quietly by statea stateb: replace mixXgr=. if ~((leadid_a==leadid_a[_n-1] &
>       leadid_a==leadid_a[_n-2])) & mixXgr==growth2a;

. replace mixXgr=growth2b if dem_aut==1 & democ_b_cg==1 ;
(30866 real changes made)

. quietly by statea stateb: replace mixXgr=. if ~((leadid_b==leadid_b[_n-1] &
>       leadid_b==leadid_b[_n-2])) & mixXgr==growth2b;

. replace mixXgr=0 if mixXgr==. & dem_aut==0;
(359359 real changes made)

. /*test for growth effect on democs in dyads with incoherent states*/
> gen incohXgr=growth2a if dem_incoh==1 & democ_a_cg==1 ;
(415084 missing values generated)

. quietly by statea stateb: replace incohXgr=. if ~((leadid_a==leadid_a[_n-1] &
>       leadid_a==leadid_a[_n-2])) & incohXgr==growth2a;

. replace incohXgr=growth2b if dem_incoh==1 & democ_b_cg==1 ;
(32472 real changes made)

. quietly by statea stateb: replace incohXgr=. if ~((leadid_b==leadid_b[_n-1] &
>       leadid_b==leadid_b[_n-2])) & incohXgr==growth2b;

. replace incohXgr=0 if incohXgr==. & dem_incoh==0;
(371878 real changes made)

. #del cr
delimiter now cr
. drop leadid* growth2a growth2b

. 
. gen dependa=trade/cgdpa
(32561 missing values generated)

. gen dependb=trade/cgdpb
(32561 missing values generated)

. drop trade cgdp* 

. 
. gen smldep=dependa if dependa<=dependb & dependb~=.  
(155814 missing values generated)

. replace smldep=dependb if dependb<dependa & dependa~=.  
(123253 real changes made)

. gen lrgdep=dependb if dependa<=dependb & dependb~=.  
(155814 missing values generated)

. replace lrgdep=dependa if dependb<dependa & dependa~=.  
(123253 real changes made)

. 
. replace smldep=. if dependa>1 | dependb>1
(28 real changes made, 28 to missing)

. drop depend*

. 
. /*identify fatal disputes, in year t+1*/
. gen fatal1=1 if mzfatald1>0 & mzfatald1~=.
(464918 missing values generated)

. replace fatal1=0 if mzfatald1==0
(463689 real changes made)

. 
. gen lndstab=ln(distance)

. 
. /*identify dyads w/ land border*/
. gen dircont=1 if contig<6
(445146 missing values generated)

. replace dircont=0 if contig==6
(445146 real changes made)

. 
. gen majpower=1 if majpow_a==1 | majpow_b==1
(422899 missing values generated)

. replace majpower=0 if majpower==.
(422899 real changes made)

. 
. /*create control for number of states in system*/
. gen systsize=ln(numstate) if ~(dircont==1 | majpower==1)
(59096 missing values generated)

. replace systsize=0 if systsize==.
(59096 real changes made)

. 
. gen dyadid=(1000*statea)+stateb  

. 
. btscs fatal1 year dyadid, gen(py) nspline(3)

. 
. #del ;
delimiter now ;
. /*TABLE 3, COLUMN 1*/
> logit fatal1 jntdem dem_aut dem_incoh smldep lncaprat allies
>       dircont lndstab majpower systsize py _spline*, nolog 
>       cluster(dyadid);

Logit estimates                                   Number of obs   =     431945
                                                  Wald chi2(14)   =    1189.54
                                                  Prob > chi2     =     0.0000
Log pseudo-likelihood = -2595.1127                Pseudo R2       =     0.2835

                           (standard errors adjusted for clustering on dyadid)
------------------------------------------------------------------------------
             |               Robust
      fatal1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      jntdem |  -1.207154   .4543585    -2.66   0.008     -2.09768   -.3166278
     dem_aut |   .4886863   .1829637     2.67   0.008     .1300841    .8472885
   dem_incoh |  -.0695081   .2250425    -0.31   0.757    -.5105833     .371567
      smldep |  -129.6743   40.76372    -3.18   0.001    -209.5697   -49.77886
    lncaprat |  -.4030233   .0520638    -7.74   0.000    -.5050664   -.3009802
      allies |  -.1530473   .1863157    -0.82   0.411    -.5182193    .2121248
     dircont |   1.054555   .2663234     3.96   0.000     .5325712     1.57654
     lndstab |  -.5067489   .0898119    -5.64   0.000     -.682777   -.3307208
    majpower |   1.148914   .2572829     4.47   0.000     .6446483    1.653179
    systsize |  -.4638353   .0679607    -6.83   0.000    -.5970359   -.3306348
          py |  -.2671754    .034547    -7.73   0.000    -.3348863   -.1994646
    _spline1 |  -.0012828   .0002575    -4.98   0.000    -.0017874   -.0007782
    _spline2 |   .0007297   .0001811     4.03   0.000     .0003747    .0010847
    _spline3 |  -.0001543   .0000586    -2.63   0.008    -.0002692   -.0000394
       _cons |   .2174064   .6857193     0.32   0.751    -1.126579    1.561391
------------------------------------------------------------------------------

note: 47 failures and 0 successes completely determined.

.   /*TABLE 3, COLUMN 2*/
> logit fatal1 jntdem dem_aut dem_incoh jntdXgr mixXgr incohXgr smldep lncaprat
>  allies
>       dircont lndstab majpower systsize py _spline*,nolog cluster(dyadid);

Logit estimates                                   Number of obs   =     320345
                                                  Wald chi2(17)   =    1003.37
                                                  Prob > chi2     =     0.0000
Log pseudo-likelihood =  -2021.992                Pseudo R2       =     0.2808

                           (standard errors adjusted for clustering on dyadid)
------------------------------------------------------------------------------
             |               Robust
      fatal1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      jntdem |  -1.088618   .6222496    -1.75   0.080    -2.308204    .1309691
     dem_aut |   .6508823   .2048088     3.18   0.001     .2494644      1.0523
   dem_incoh |   .4196948   .2385481     1.76   0.079    -.0478508    .8872405
     jntdXgr |  -14.46801    5.78653    -2.50   0.012     -25.8094   -3.126614
      mixXgr |   .4106373   3.228597     0.13   0.899    -5.917297    6.738571
    incohXgr |  -3.052602   3.873196    -0.79   0.431    -10.64393    4.538724
      smldep |  -106.6973   40.90717    -2.61   0.009    -186.8739   -26.52071
    lncaprat |  -.4101295   .0542811    -7.56   0.000    -.5165184   -.3037405
      allies |  -.2225891    .181912    -1.22   0.221    -.5791301     .133952
     dircont |   1.282739   .3025244     4.24   0.000     .6898018    1.875676
     lndstab |  -.5281392   .0975958    -5.41   0.000    -.7194235   -.3368548
    majpower |    1.36896   .2687994     5.09   0.000     .8421226    1.895797
    systsize |  -.3642124   .0688301    -5.29   0.000    -.4991169    -.229308
          py |  -.3085715   .0382294    -8.07   0.000    -.3834997   -.2336432
    _spline1 |  -.0016275   .0002855    -5.70   0.000     -.002187    -.001068
    _spline2 |   .0009673   .0002008     4.82   0.000     .0005738    .0013608
    _spline3 |  -.0002203   .0000653    -3.37   0.001    -.0003484   -.0000923
       _cons |   .1769579   .7862108     0.23   0.822    -1.363987    1.717903
------------------------------------------------------------------------------

note: 18 failures and 0 successes completely determined.

.   testparm jntdX mixX incohX;

 ( 1)  jntdXgr = 0
 ( 2)  mixXgr = 0
 ( 3)  incohXgr = 0

           chi2(  3) =    6.56
         Prob > chi2 =    0.0875


. exit;

end of do-file
       log:  c:\growth\isqfinal\ot_tbl3.log
  log type:  text
 closed on:   7 Apr 2006, 16:46:19
-------------------------------------------------------------------------------
